<template>
  <div>
    {{ msg }}
    {{ Date.now() }}
    <a-button @click="f">点我{{ msg }}</a-button>
    <keep-alive :include="['ojbk']">
      <router-view />
    </keep-alive>
    <div>跳转开始</div>
    <br />
    <router-link to="/pussy/one">one</router-link>
    <br />
    <router-link to="/pussy/two">two</router-link>
    <br />
    <div>跳转结束</div>
    <input type="text" v-model="txt" />
  </div>
</template>

<script lang="ts" setup>
const msg = ref({
  one: "haha",
});
const txt = ref("haha");
let msvValue = msg.value;
const f = () => {
  console.log("msvValue", msvValue);
  msvValue.xxx = 123;
};
const route = useRoute();
watch(
  route,
  (newVal, oldVal) => {
    console.log("执行了watch逻辑", route.fullPath);
  },
  {
    immediate: true,
  }
);
</script>

<style scoped></style>
